package com.weidft.web.biz;

public class SpecialCharTools {
    public static String replace(String text)
    {
        if (text==null||text.trim().length()==0)
        {
            return text;
        }
        text = text.replaceAll("&copy;","©");
        text = text.replaceAll("&reg;","®");
        text = text.replaceAll("&plusmn;","±");
        text = text.replaceAll("&yen;","¥");
        
        text = text.replaceAll("&raquo;","»");
        text = text.replaceAll("&cent;","¢");
        text = text.replaceAll("&micro;","µ");
        text = text.replaceAll("&infin;","∞");
        text = text.replaceAll("%&permil;","‰");
        text = text.replaceAll("&ordm;","º");
        text = text.replaceAll("&Omega;","Ω");
        text = text.replaceAll("&oslash;","ø");
        text = text.replaceAll("&Oslash;","Ø");
        text = text.replaceAll("&sect;","§");
        text = text.replaceAll("&pound;","£");
        text = text.replaceAll("&phi;","φ");
        
        text = text.replaceAll("&Phi;","Φ");
        text = text.replaceAll("&frac12;","½");
        text = text.replaceAll("&frac14;","¼");
        text = text.replaceAll("&frac34;","¾");
        
        return text;
    }
}
